package com.administrator.scoreManageSys.entity.system;

import com.fasterxml.jackson.annotation.JsonInclude;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;

/**
 * 角色实体类
 * @author Administrator
 */
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class Role implements Serializable {
    /**
     * 角色Id
     */
    private Long id;
    /**
     * 角色名称
     */
    @NotEmpty(message = "角色名称不能为空！")
    private String name;
    /**
     * 角色拥有的权限
     */
    private List<Permission> permissions;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Permission> getPermissions() {
        return permissions;
    }

    public void setPermissions(List<Permission> permissions) {
        this.permissions = permissions;
    }
}
